﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Menu.aspx.cs" Inherits="Main_Utilities_MenuEdit" %>

<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <link href="../../Styles/accounts.css" rel="Stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="divmain">
        <acc:heading ID="pagehead" runat="server" HeadingText="Menu Items" EnableViewState="false" />
    </div>
    <div style="margin-left: 30%;">
        <asp:Label ID="lblMsg" runat="server" Font-Bold="true" EnableViewState="false"></asp:Label></div>
    <table class="tablecontent" style="width: 35%; margin-left: 30%; margin-right: 25%;
        border: 1px solid #818181">
        <tr>
            <td class="headtd" colspan="2">
                Menu Item Detail
            </td>
        </tr>
        <tr>
            <td style="width:120px;">&nbsp;
                Text &nbsp; <span class="required">*</span>
            </td>
            <td>
                <asp:TextBox ID="TxtText" runat="server" Width="330px" ToolTip="Enter Text" CssClass="input"> </asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVText" runat="server" ValidationGroup="name" ControlToValidate="TxtText"
                    ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
               &nbsp; Add New Url&nbsp; <span class="required">*</span>
            </td>
            <td>
                <asp:TextBox ID="txtUrlAddNew" runat="server" Width="330px" ToolTip="Enter Url of Add New"
                    CssClass="input"> </asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVUrl" runat="server" ValidationGroup="name" ControlToValidate="txtUrlAddNew"
                    ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
               &nbsp; View Url &nbsp; <span class="required">*</span>
            </td>
            <td>
                <asp:TextBox ID="txtUrlView" runat="server" Width="330px" ToolTip="Enter Url of View"
                    CssClass="input"> </asp:TextBox>
                <asp:RequiredFieldValidator ID="RFVUrlView" runat="server" ValidationGroup="name"
                    ControlToValidate="txtUrlView" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
               &nbsp; Under &nbsp;
            </td>
            <td>
                <asp:DropDownList ID="DDLUnderCategory" runat="server" Width="150px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td></td>            
            <td>
                <asp:Button ID="BtnCreate" runat="server" Text="Create" CssClass="button" OnClick="Create_Click"
                    ValidationGroup="name" />
                &nbsp;
                <asp:Button ID="BtnUpdate" runat="server" Text="Update" CssClass="button" Visible="false"
                    OnClick="BtnUpdate_Click" />
                &nbsp;
                <asp:Button ID="Close" runat="server" Text="Close" CssClass="button" />
            </td>
        </tr>
    </table>
    <div style="border: 1px solid #919da2; margin: 10px; width: 90%; margin-left: 5%;
        margin-right: 5%; padding: 5px;">
        <asp:Repeater ID="ParentRepeater" runat="server" OnItemDataBound="ParentRepeater_ItemDataBound">
            <HeaderTemplate>
            </HeaderTemplate>
            <ItemTemplate>
                <b style="font-size: 12px; width: 100%; font-weight: bolder; font-size: 13px; display: block;">
                    <asp:Label ID="LblHead" runat="server" Text='<%#Eval("text")%>'></asp:Label>
                </b>
                <asp:Repeater ID="ChildRepeater" runat="server" OnItemCommand="ChildRepeater_ItemCommand">
                    <HeaderTemplate>
                        <table style="width: 100%; text-align: left; border: 1px solid #919da2; overflow: hidden;"
                            cellspacing="0">
                            <tr style="background-image: url('../../Images/login/white1.jpg'); background-repeat: repeat-x;">
                                <th style="border-right: 1px solid #aeb8bb; border-top: 1px solid #aeb8bb; text-align: center;">
                                    Text
                                </th>
                                <th style="border-right: 1px solid #aeb8bb; border-top: 1px solid #aeb8bb; text-align: center;">
                                    Add New Url
                                </th>
                                <th style="border-right: 1px solid #aeb8bb; border-top: 1px solid #aeb8bb; text-align: center;">
                                    View Url
                                </th>
                                <th style="border-top: 1px solid #aeb8bb; text-align: center;">
                                    Actions
                                </th>
                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td style="font-size: 11px; border-right: 1px solid #aeb8bb; border-top: 1px solid #aeb8bb;
                                width: 20%;">
                                <asp:Label ID="LblText" runat="server" Text='<%# Eval("text")%>'></asp:Label>
                            </td>
                            <td style="font-size: 11px; border-top: 1px solid #aeb8bb; border-right: 1px solid #aeb8bb;
                                width: 40%; word-wrap: break-word;">
                                <asp:Label ID="LblUrlAddNew" runat="server" Text='<%#Eval("urlAddNew")%>'></asp:Label>
                            </td>
                            <td style="font-size: 11px; border-top: 1px solid #aeb8bb; border-right: 1px solid #aeb8bb;
                                width: 30%;">
                                <asp:Label ID="LblUrlView" runat="server" Text='<%#Eval("urlView")%>'></asp:Label>
                            </td>
                            <td align="center" style="font-size: 11px; border-top: 1px solid #aeb8bb; width: 10%;">
                                <asp:ImageButton ID="img" runat="server" CommandName="Edit" ImageUrl="~/Menu/images/Edit_user.png"
                                    AlternateText="Edit" />
                                &nbsp;
                                <asp:ImageButton ID="ImgBtnDel" runat="server" CommandName="Delete" ImageUrl="~/Menu/images/cancel.png"
                                    AlternateText="Delete" OnClientClick="return confirm('Are you sure to delete?')" />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <tr>
                            <td style="font-size: 11px; border-right: 1px solid #aeb8bb; border-top: 1px solid #aeb8bb;
                                width: 20%;">
                                <asp:Label ID="LblText" runat="server" Text='<%# Eval("text")%>'></asp:Label>
                            </td>
                            <td style="font-size: 11px; border-top: 1px solid #aeb8bb; border-right: 1px solid #aeb8bb;
                                width: 40%;">
                                <asp:Label ID="LblUrlAddNew" runat="server" Text='<%#Eval("urlAddNew")%>'></asp:Label>
                            </td>
                            <td style="font-size: 11px; border-top: 1px solid #aeb8bb; border-right: 1px solid #aeb8bb;
                                width: 30%;">
                                <asp:Label ID="LblUrlView" runat="server" Text='<%#Eval("urlView")%>'></asp:Label>
                            </td>
                            <td align="center" style="font-size: 11px; border-top: 1px solid #aeb8bb; border-right: 1px solid #aeb8bb;
                                width: 10%;">
                                <asp:ImageButton ID="img" runat="server" CommandName="Edit" ImageUrl="~/Menu/images/Edit_user.png"
                                    AlternateText="Edit" />
                                &nbsp;
                                <asp:ImageButton ID="ImgBtnDel" runat="server" CommandName="Delete" ImageUrl="~/Menu/images/cancel.png"
                                    AlternateText="Delete" OnClientClick="return confirm('Are you sure to delete?')" />
                            </td>
                        </tr>
                    </AlternatingItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
            </ItemTemplate>
            <FooterTemplate>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    </form>
</body>
</html>
